//
//  YJTableCell.m
//  com.yjwh.yj
//
//  Created by ferver7 on 2018/10/8.
//  Copyright © 2018年 ferver7. All rights reserved.
//

#import "MDDTableCell.h"

@implementation MDDTableCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
}
-(void)reloadViewForModel:(id)model
{
    _model = model;
}
- (void)setupPreviewingDelegateWithController:(UIViewController<UIViewControllerPreviewingDelegate> *)controller {
    if (self.isAllreadySetupPreviewingDelegate == YES) {
        return;
    }
    if ([self respondsToSelector:@selector(traitCollection)]) {
        if ([self.traitCollection respondsToSelector:@selector(forceTouchCapability)]) {
            if (self.traitCollection.forceTouchCapability == UIForceTouchCapabilityAvailable) {
                [controller registerForPreviewingWithDelegate:controller sourceView:self];
                self.isAllreadySetupPreviewingDelegate = YES;
            } else {
                self.isAllreadySetupPreviewingDelegate = NO;
            }
        }
    }
}
- (BOOL)isAllreadySetupPreviewingDelegate {
    return _isAllreadySetupPreviewingDelegate;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
